package com.uniview.config;

import com.uniview.interceptor.GlobalFeignInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * created by lux
 */
@Configuration
@Slf4j
public class AutoConfiguration {
    @Bean
    @ConditionalOnMissingBean
    public GlobalFeignInterceptor globalFeignInterceptor(){
        GlobalFeignInterceptor globalFeignInterceptor = new GlobalFeignInterceptor();
        log.info("GlobalFeignInterceptor [{}]",globalFeignInterceptor);
        return globalFeignInterceptor;
    }
}
